package com.heima.user.controller.v1;


import com.heima.model.admin.dtos.AuthDto;
import com.heima.model.common.dtos.ResponseResult;
import com.heima.user.service.AdUserAuthService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/api/v1/auth")
@Api(value = "管理端用户审核相关接口",tags = "管理端用户审核相关接口")
public class AdUserAuthController {

    
    @Autowired
    private AdUserAuthService adUserAuthService;

    @PostMapping("/list")
    @ApiOperation("查询用户审核列表")
    public ResponseResult list(@RequestBody AuthDto dto){return adUserAuthService.list(dto);
    }

    @PostMapping("/authFail")
    @ApiOperation("驳回用户的审核")
    public ResponseResult authFail(@RequestBody AuthDto dto){
        return adUserAuthService.authFail(dto);
    }


    @PostMapping("/authPass")
    @ApiOperation("通过用户的审核")
    public ResponseResult authPass(@RequestBody AuthDto dto){
        return adUserAuthService.authPass(dto);
    }
}
